package pro.lepers.portfolio.view.contents.portfolio {
	import pro.lepers.portfolio.view.contents.AbstractContent;
	import pro.lepers.portfolio.view.contents.portfolio.data.ProjectProvider;

	/**
	 * @author plepers
	 */
	public class Portfolio extends AbstractContent {

		
		public function Portfolio () {
		}

		
	
		
		override public function setDatas (datas : XML) : void {
			_provider = new ProjectProvider( _node, datas );
			_node.describe( _provider );
			_provider.compile( );
			_buildFrise( );
		}

		
		override public function setSize (w : int, h : int) : void {
			super.setSize( w, h );
			
			_frise.x = Math.round( _w / 2 );
			_frise.y = Math.round( _h / 2 );
			
			_frise.height = _h;
		}


		private function _buildFrise () : void {
			_frise = new ProjectFrise( _provider );
			addChild( _frise );
		}

		override public function dispose () : void {
			_frise.dispose( );
			_provider.dispose( );
		}

		private var _provider : ProjectProvider;

		private var _frise : ProjectFrise;
	}
}
